import cucumber.api.Result;
import cucumber.api.Scenario;
import cucumber.api.java.After;
import org.mockito.exceptions.Reporter;

import java.io.IOException;

/**
 * Created by chenkuo on 2018/3/6.
 */
public class Hook {
    @After
    public void afterHook(Scenario scenario) throws IOException {
        if (scenario.getStatus().equals(Result.Type.FAILED)) {
            System.out.println(scenario.getName());
            System.out.println("id:"+scenario.getId());
            System.out.println("uri:"+scenario.getUri());
            System.out.println("line:"+scenario.getLines());
            System.out.println("场景失败后执行的操作");
        }
    }
}
